﻿//-----------------------------------------------------------------------------
//<filedescription file="ApplyDialog.cs" company="Microsoft">
//  <copyright>
//     Copyright © Microsoft Corporation.  All rights reserved.
//     ***  DESIGNATED SAMPLE CODE (per the included software license terms) ***
//      THIS CODE SAMPLE IS MADE AVAILABLE TO YOU WITHOUT WARRANTY OF ANY KIND
//      AND CONFERS NO RIGHTS ON YOU WHATSOEVER EXCEPT THE RIGHT TO REVIEW IT
//      SOLELY AS A REFERENCE.  THE ENTIRE RISK OF USE OR RESULTS FROM USE OF
//      THIS CODE SAMPLE REMAINS WITH YOU.
//  </copyright>
//  <purpose>
//    
//  </purpose>
//  <notes>
//  </notes>
//</filedescription>
//-----------------------------------------------------------------------------



using System;
using System.Windows.Forms;

namespace Microsoft.ConfigurationManagement.IntegrationDevelopmentKit.CustomReboot
{
    /// <summary>
    /// 
    /// </summary>
    public partial class ApplyDialog : Form
    {
        /// <summary>
        /// 
        /// </summary>
        public string PageText
        {
            set 
            { 
                richTextBox2.Text = value;
                richTextBox2.Visible = true;
                webBrowser1.Visible = false;
            }
        }
        /// <summary>
        /// 
        /// </summary>
        public string PageHtml
        {
            set 
            { 
                webBrowser1.DocumentText = value;
                richTextBox2.Visible = false;
                webBrowser1.Visible = true;
            }
        }
        /// <summary>
        /// 
        /// </summary>
        public string PageTitle
        {
            set { Text = value; }
        }
        /// <summary>
        /// 
        /// </summary>
        public bool IsCancelButtonVisible
        {
            get { return buttonCancel.Visible; }

            set { buttonCancel.Visible = value; }
        }

        /// <summary>
        /// 
        /// </summary>
        public ApplyDialog()
        {
            InitializeComponent();
        }

        private void buttonOk_Click(object sender, EventArgs e)
        {
            DialogResult = DialogResult.OK;
            Close();
        }

        private void buttonCancel_Click(object sender, EventArgs e)
        {
            DialogResult = DialogResult.Cancel;
            Close();
        }
    }
}
